<p>
	<input type="button" id="toggle_megamenu" name="add-custom-menu-item" value="Show Mega Menu Options" class="button-secondary submit-add-to-menu">
</p>
<div id="megamenu_options" style="display:none;width:94%;" class="link-to-original">
    <p class="">
        <label class="field" for="megamenu-active">
            <?php $checked = (get_post_meta($item_id, '_menu_item_status', true) == 'active') ? ' checked="checked"' : ''; ?>
            <input type="checkbox" name="megamenu_status[<?php echo $item_id; ?>]" value="active" <?php echo $checked; ?>> <span><?php _e('Mega Menu'); ?>?</span>
        </label>
    </p>
    <p class="">
        <label for="menu-columns" class="field"><span><?php _e('Columns'); ?>:</span>
            <select id="megamenu_columns" name="nuke_menu_columns[<?php echo $item_id; ?>]">
            <?php
            $columns = range(2, 8,2);
            foreach($columns as $k=>$v){ 
                $selected = (get_post_meta($item_id, '_nuke_menu_columns', true) == $v) ? ' selected="selected"' : ''; ?>
                    <option value="<?php echo $v; ?>" <?php echo $selected; ?>><?php echo $v; ?></option>
            <?php } ?>
            </select>
        </label>
    </p>
    <p class="">
        <label for="menu-devide" class="field"><span><?php _e('Division'); ?>:</span>
            <select id="megamenu_devide" name="nuke_menu_devide[<?php echo $item_id; ?>]">
            <?php
			$devision = get_post_meta($item_id, '_nuke_menu_columns', true);
            $columns = range(2, $devision, 2);
            foreach($columns as $k=>$v){ 
                $selected = (get_post_meta($item_id, '_nuke_menu_devide', true) == $v) ? ' selected="selected"' : ''; ?>
                    <option value="<?php echo $v; ?>" <?php echo $selected; ?>><?php echo $v; ?>/<?php echo $devision; ?></option>
            <?php } ?>
            </select>
        </label>
    </p>
    <p class="">
        <label for="menu-align" class="field"><span><?php _e('Alignment'); ?>:</span>
            <select name="nuke_menu_align[<?php echo $item_id; ?>]">
            <?php
            $align = array('right'=>__('Right'), 'left'=>__('Left'));
            foreach($align as $k=>$v){ 
                $selected = (get_post_meta($item_id, '_nuke_menu_align', true) == $k) ? ' selected="selected"' : ''; ?>
                <option value="<?php echo $k; ?>" <?php echo $selected; ?>><?php echo $v; ?></option>
            <?php } ?>
            </select>
        </label>
    </p>
    <p class="" style="clear:both;">
        <label for="megamenu-fullwidth" class="field">
        <?php $checked = (get_post_meta($item_id, '_megamenu_auto_adjust', true) == 'active') ? ' checked="checked"' : ''; ?>
            <input type="checkbox" name="megamenu_auto_adjust[<?php echo $item_id; ?>]" value="active" <?php echo $checked; ?>> <span><?php _e('Auto Adjust? :'); ?></span>
        </label>
    </p>
    <p class="">
        <label class="field" for="menu-sidebars"><span><?php _e('Select Sidebar'); ?>:</span>
            <select name="nuke_menu_sidebar[<?php echo $item_id; ?>]">
            <?php
            foreach($wp_registered_sidebars as $k=>$v){ 
                //if(strstr($k, 'megamenu-')){
                    $selected = (get_post_meta($item_id, '_menu_item_sidebar', true) == $k) ? ' selected="selected"' : '';?>
                    <option value="<?php echo $k; ?>" <?php echo $selected; ?>><?php echo $v['name']; ?></option>
            <?php //} 
            } ?>
            </select>
        </label>
    </p>
    <div class="clear"></div>
</div>